<?php

ini_set('display_errors', 1);
error_reporting(-1);
require_once '/data/wwwroot/g_vendor/autoload.php';
ini_set('memory_limit', '512M');


echo (ini_get('memory_limit')) , PHP_EOL;
$brand_id = $argv[1] ?? [];
$brand_id = empty($brand_id) ? [] : explode(',', $brand_id);

if ($brand_id) {
    echo "------cache------", PHP_EOL;

    $brandCache = \Biz\cache\brand\BrandNameAndAlias::getData($brand_id);
    $spuCache = \Biz\cache\brand\BrandSpu::getData($brand_id);

    var_dump(compact('brandCache', 'spuCache'));
}

echo "------ALL------", PHP_EOL;

list(
    'matchBrandWordsMap' => $matchBrandWordsMap,
    'brandUidMap' => $brandUidMap,
    'brandName' => $brandName) = empty($brand_id) ? \Biz\service\wiki\WikiContentSync::getAllBrandKeyWords() : \Biz\service\wiki\WikiContentSync::getBrandKeyWords($brand_id);

var_dump($matchBrandWordsMap, $brandUidMap, $brandName, implode(',', array_column($brandName, 'id')));




